<?php
session_start();
include "Includes/solotrn_sesion.php";
include "Includes/soloFun_Generales.php";
require_once "config.php";
require_once "Includes/conexion.class.php";
?>
<html>
    <head>
        <title>Ticket</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <link href="SoloStyles/Solostyles.css" rel="stylesheet" type="text/css">
        <SCRIPT type="text/JavaScript" src="Includes/Solofun_generales.js"></SCRIPT>
    </head>
    <body>
<div class="impresion">
    <table cellpadding="0" cellspacing="0" style="border: 2px solid; border-bottom: 0; border-collapse: collapse; width: 50%">
        <tr>
            <td class="SoloStyle_texto" style="border-bottom: 1px solid;">
                <img src="templates/SoloTemplate_LogoCabecera.png" alt="MIES" title="MIES" style="width: 30%"/>
            </td>
            <td style="border-bottom: 1px solid; text-align: center">
                <span class="SoloStyle_TextoBold">Ministerio De Inclusi&oacute;n Econ&oacute;mica y Social</span>
            </td>
        </tr>
    </table>

    <table cellpadding="0" cellspacing="0" style="border: 2px solid; border-collapse: collapse; width: 50%; border-top: 0">
        <tr>
            <td class="SoloStyle_TextoBold" style="padding: 10px; padding-left: 30px; vertical-align: top">Organizaci&oacute;n</td>
            <td class="SoloStyle_Texto"><?php
$oConexion = new Conexion($MIES["motor_base"], $MIES["db_usuario"], $MIES["db_password"],
        $MIES["basedatos"], $MIES["servidor"], $MIES["flags"], $MIES["encoding"]);
$query = "SELECT campo2 FROM MIES.TDL_DATOS WHERE id_tdl_datos = " . $_REQUEST["asunto"];
$asunto = SoloFun_ExecSqlFull($query, $Arreglo, $oConexion);
echo wordwrap($asunto, "50", "<br/>"); ?></td>
        </tr>
        <tr>
            <td class="SoloStyle_TextoBold" style="padding: 10px; padding-left: 30px; vertical-align: top">No. Ticket</td>
            <td class="SoloStyle_Texto"><?php echo wordwrap($_REQUEST["ticket"], "50", "<br/>"); ?></td>
        </tr>
        <tr>
            <td class="SoloStyle_TextoBold" style="padding: 10px; padding-left: 30px; vertical-align: top">Tr&aacute;mite</td>
            <td class="SoloStyle_Texto"><?php
$query = "SELECT des FROM solotb_nivel4 WHERE id4 = " . $_REQUEST["tramite"];
$tramite = SoloFun_ExecSql($query, $Arreglo);
echo wordwrap($tramite, "50", "<br/>");
?></td>
        </tr>
        <tr>
            <td class="SoloStyle_TextoBold" style="padding: 10px; padding-left: 30px; vertical-align: top">Fecha Ingreso</td>
            <td class="SoloStyle_Texto"><?php echo wordwrap($_REQUEST["fecha_ingreso"], "50", "<br/>"); ?></td>
        </tr>
        <tr>
            <td class="SoloStyle_TextoBold" style="padding: 10px; padding-left: 30px; vertical-align: top">Receptor</td>
            <td class="SoloStyle_Texto"><?php echo wordwrap($_REQUEST["usuario"], "50", "<br/>"); ?></td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: right" class="SoloStyle_Texto">____________________</td>
        </tr>
        <tr>
            <td colspan="2" class="SoloStyle_Texto" style="text-align: right; font-size: 10px">Firma Usuario&nbsp;&nbsp;&nbsp;&nbsp;</td>
        </tr>
    </table>
</div>
<script type="text/javascript">
    window.print();
    window.close();
</script>
</body>
</html>